﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SuYunExpressPackageSystem.Models.UIModels;
using SuYunExpressPackageSystem.DAL;
using SuYunExpressPackageSystem.Models.VModels;

namespace SuYunExpressPackageSystem.BLL
{
    public class DistributeExpressBLL
    {
        private ViewDistributeExpressDAL ViewDistributeExpressDAL = new ViewDistributeExpressDAL();
        private ExpDistributeDAL distributeDAL = new ExpDistributeDAL();

        /// <summary>
        /// 分页查询快递派送信息列表
        /// </summary>
        /// <param name="keywords"></param>
        /// <param name="recPhone"></param>
        /// <param name="expState"></param>
        /// <param name="startIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public PageModel<ViewDistributeExpressInfo> FindDistributeExpressList(string keywords, int stationId, string recPhone, string expState, int startIndex, int pageSize)
        {
            return ViewDistributeExpressDAL.FindDistributeExpressList(keywords, stationId, recPhone, expState, startIndex, pageSize);
        }

        /// <summary>
        /// 保存派送安排
        /// </summary>
        /// <param name="expIds"></param>
        /// <param name="empId"></param>
        /// <param name="disTime"></param>
        /// <returns></returns>
        public bool SaveDistributeAssignSet(List<int> expIds, int empId, DateTime disTime)
        {
            return distributeDAL.SaveDistributeAssignSet(expIds, empId, disTime);
        }
    }
}